﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Project_ScansiaPacific
{
    public partial class FrGridview : Form
    {
        FrKV2_XP FrKV2;
        public FrGridview()
        {
            InitializeComponent();
            
        }
        public FrGridview(FrKV2_XP fr1)
        {
            InitializeComponent();
            FrKV2 = new FrKV2_XP();
            FrKV2 = fr1;
        }
        public void datagrid(DataTable dt)
        {
            dataGridViewX1.DataSource = dt;
        }
       
       
        private void dataGridViewX1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
              
                Process prs = new Process();
                int r = dataGridViewX1.CurrentCell.RowIndex;
                int k = dataGridViewX1.CurrentCell.ColumnIndex;
                
                if (dataGridViewX1.Columns[k].Name == "Serial_KV2")
                {
                   
                    FrKV2.Serial_get(dataGridViewX1.Rows[r].Cells[k].Value.ToString());
                  
                }
                
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.Message);

            }
        }
    }
}
